/**
 * 
 */
package org.cuatrovientos.exceptions;

import java.util.Scanner;

/**
 * 
 * @author daniel_ancin
 *
 */
public class Fail {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		int number =0;
		String line="";
		Scanner reader = new Scanner(System.in);
		
		System.out.println ("Enter a number");
		
		try{
		line = reader.nextLine();
		number= Integer.parseInt(line);
		}catch (NumberFormatException nfe) {
			
			System.out.println("Number format: " +nfe.getMessage());
			
		}catch (Exception e) {

			System.out.println("Other error: " +e.getMessage());
		
		}
		
		System.out.println("You entered: " +number);
		
	}

}
